<!-- 个人信息 -->
<template>
    <div class="mine-layout">
        <!-- 头像 -->
        <section class="mine-header">
            <img src="src/assets/sort/tx.jpg" class="header-img" />
            <ul class="user-info">
                <li class="user-name">小孟</li>
            </ul>
        </section>
        <section class="my-info">
            <ul class="info-list">
                <li class="info-item">
                    <b>666</b>
                    <span>商品关注</span>
                </li>
                <li class="info-item">
                    <b>88</b>
                    <span>店铺关注</span>
                </li>
                <li class="info-item">
                    <b>888</b>
                    <span>我的足迹</span>
                </li>
            </ul>
        </section>
        <!-- 订单信息 -->
        <section class="order-all">
            <a @click="orderStatus(0)" class="look-orders" tag="span">查看全部订单>></a>
            <ul class="order-list">
                <a @click="orderStatus(1)" class="order-item" tag="li">
                    <van-icon name="gold-coin-o" size="40"></van-icon>
                    <span>待付款</span>
                </a>
                <a @click="orderStatus(2)" class="order-item" tag="li">
                    <van-icon name="todo-list-o" size="40"></van-icon>
                    <span>待发货</span>
                </a>
                <a @click="orderStatus(3)" class="order-item" tag="li">
                    <van-icon name="logistics" size="40"></van-icon>
                    <span>待收货</span>
                </a>
                <a @click="orderStatus(4)" class="order-item" tag="li">
                    <van-icon name="contact" size="40"></van-icon>
                    <span>退换/售后</span>
                </a>
            </ul>
        </section>
        <section class="mine-content">
            <ul class="options-list">
                <router-link to="/" class="option-item" tag="li">
                    <div class="item-info">
                        <svg-icon class="incon" icon-class="shipping-address"></svg-icon>
                        <span>收货地址</span>
                    </div>
                    <van-icon name="arrow" color="#DBDBDB" />
                </router-link>
                <router-link to="/" class="option-item" tag="li">
                    <div class="item-info">
                        <svg-icon class="incon" icon-class="message-center"></svg-icon>
                        <span>消息中心</span>
                    </div>
                    <van-icon color="#DBDBDB" name="arrow" />
                </router-link>
                <router-link to="/" class="option-item" tag="li">
                    <div class="item-info">
                        <svg-icon class="incon" icon-class="help-center"></svg-icon>
                        <span>帮助中心</span>
                    </div>
                    <van-icon color="#DBDBDB" name="arrow" />
                </router-link>
                <router-link to="/" class="option-item" tag="li">
                    <div class="item-info">
                        <svg-icon class="incon" icon-class="setting"></svg-icon>
                        <span>设置</span>
                    </div>
                    <van-icon color="#DBDBDB" name="arrow" />
                </router-link>
            </ul>
        </section>
        <tabbar></tabbar>
    </div>
</template>
<script setup lang="ts">
import { useRouter } from 'vue-router';
const $router = useRouter();
// 路由跳转并传参
const orderStatus = (num: number) => {
    $router.push({
        name: 'orderStatus',
        params: {
            id: num,
        },
    }
    );
};
</script>
  
<style scoped lang="scss">
.mine-layout {
    padding: 30px 16px;
    min-height: 812px;
    padding-bottom: 50px;

    background: linear-gradient(#048fec, #10bfd6);

    .mine-header {
        display: flex;
        padding-left: 24px;
        justify-content: flex-start;
        align-items: center;
        flex-direction: row;
        padding-bottom: 20px;

        .header-img {
            width: 70px;
            height: 70px;
        }

        .user-info {
            padding-left: 16px;
            font-size: 15px;
            color: #fff;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: flex-start;

            .node-info {
                padding-top: 5px;
                display: flex;
                justify-content: flex-start;
                align-items: center;

                .sharing-node {
                    padding-left: 18px;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    width: 78px;
                    height: 25px;
                    font-size: 11px;
                    text-align: center;
                    background-size: 100% 100%;
                    border-radius: 11px 11px;
                }

                .business-node {
                    margin-left: 5px;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    width: 60px;
                    height: 22px;
                    font-size: 11px;
                    text-align: center;
                    background-color: #f67183;
                    border-radius: 11px 11px;
                }
            }
        }

        .login-regist {
            font-size: 15px;
            color: #fff;
            padding-left: 16px;
        }
    }

    .my-info {
        font-size: 13px;
        color: #fff;
        padding-bottom: 16px;

        .info-list {
            display: flex;
            justify-content: space-around;
            align-items: center;

            .info-item {
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;

                b {
                    font-size: 16px;
                }
            }
        }
    }

    .order-all {
        box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        background-color: #fff;
        border-radius: 8px;

        .look-orders {
            font-size: 11px;
            font-weight: 600;
            color: #3a3a3a;
            padding-left: 19px;
            padding-top: 14px;
            padding-bottom: 18px;
        }

        .order-list {
            padding-bottom: 18px;
            display: flex;
            justify-content: space-around;
            align-items: center;

            .order-item {
                color: black;
                font-size: 14px;
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;

                span {
                    padding-top: 5px;
                    font-weight: 600;
                    color: black;
                }
            }
        }
    }

    .mine-content {
        box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.1);
        background-color: #fff;
        border-radius: 8px;
        padding: 0 16px;
        margin-top: 18px;

        .options-list {
            padding-top: 20px;

            .option-item {
                display: flex;
                justify-content: space-between;
                align-items: center;
                font-size: 16px;
                padding-bottom: 22px;

                .item-info {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    font-size: 15px;
                    color: #888;

                    .incon {
                        padding-right: 16px;
                    }

                    .header-img {
                        width: 50px;
                        height: 50px;
                        padding-right: 16px;
                    }
                }
            }
        }
    }

    .node-dialog {
        .dialog-header {
            text-align: center;
        }

        .my-node-data {
            padding: 10px 40px;
            display: flex;
            justify-content: space-around;
            align-items: center;
            flex-wrap: wrap;

            .data-item {
                display: flex;
                justify-content: center;
                align-items: center;
                flex-direction: column;
                margin-left: 10px;
                margin-bottom: 20px;

                .node-text {
                    font-size: 13px;
                    padding-top: 5px;
                    color: #3a3a3a;
                }
            }
        }

        .node-bottom {
            position: relative;

            .know-btn {
                display: flex;
                justify-content: center;
                align-items: center;
                margin: auto;
                line-height: 40px;
                width: 154px;
                border-radius: 20px 20px;
                background-color: #fce14b;
                margin-bottom: 30px;
            }

            .gray-img {
                position: absolute;
                right: 12px;
                top: 0;
            }
        }
    }
}
</style>
  
